package com.atguigu.clients;

import com.atguigu.param.ProductSearchParam;
import com.atguigu.pojo.Product;
import com.atguigu.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ClassName:SwarchClient
 * Package:com.atguigu.clients
 * Description:
 *
 * @Author 应永豪
 * @Create 2024/4/22 14:26
 * @Version 1.0
 */
@FeignClient("search-service")
public interface SearchClient {
    @PostMapping("/search/product")
    R search(@RequestBody ProductSearchParam param);

    @PostMapping("/search/save")
    R saveOrUpdate(@RequestBody Product product);

    @PostMapping("/search/remove")
    R remove(@RequestBody Integer productId);


}
